python how to count number of characters in a string